<?php
/**
 * KayPaste
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.opensource.org/licenses/bsd-license.php
 *
 * @category  KayPaste
 * @package   Boot
 * @copyright Copyright (c) 2007-2008 Robin Skoglund (http://robinsk.net/)
 * @license   http://www.opensource.org/licenses/bsd-license.php New BSD License
 * @author    Robin Skoglund
 */

/**
 * Bootstrap
 */
require dirname(dirname(__FIlE__)) . '/application/bootstrap.php';

/**
 * Imports required for web application
 */
require_once 'Zend/Controller/Front.php';
require_once 'Zend/Debug.php';

/**
 * Run application
 */
Zym_App::run(PATH_PROJECT . 'application/config/bootstrap.xml', Zym_App::ENV_DEVELOPMENT);

/**
 * Get front controller
 */
$front = Zend_Controller_Front::getInstance();

/**
 * Register plugins
 */
$front->registerPlugin(new Kaypaste_Controller_Plugin_Auth());
$front->registerPlugin(new Kaypaste_Controller_Plugin_ViewLang());

/**
 * Dispatch front controller
 */
$front->dispatch();
